<?php

class SplayTree extends BinarySearchTree 
{
	public function get($value)
	{
		$node = $this->_search($value, $this->_root);
		if($node === false){
			return false;
		}else{
			$this->_splay($node);
			return $node->getValue();
		}		
	}
	
	private function _splay()
	{
		
	}
	
	private function _zigZag(BinarySearchTreeNode $node)
	{
		
	}
	
	private function _zigZig(BinarySearchTreeNode $node)
	{
		
	}
	
	private function _zig(BinarySearchTree $node)
	{
		
	}
	

	private function &_rotateWithLeftChild(BinarySearchTreeNode $node)
	{
		$leftNode =& $node->getLeft();
		$node =& $leftNode->getRight();
		
		return $leftNode;
	}
	
	private function &_rotateWithRightChild(BinarySearchTreeNode $node)
	{
		$rightNode =& $node->getRight();
		$node =& $rightNode->getRight();
		
		return $rightNode;		
	}

}
?>